CXX=g++
CXXFLAGS=-std=c++11 -fPIC -I.
LDFLAGS=-L./lib -ldummy
TARGET=ServiceC

all: lib/libdummy.so $(TARGET)

lib/libdummy.so: lib/dummy_lib.cpp lib/dummy_lib.h
	$(CXX) $(CXXFLAGS) -shared -o $@ $<

$(TARGET): service.cpp lib/libdummy.so
	$(CXX) $(CXXFLAGS) -o $@ service.cpp $(LDFLAGS)

clean:
	rm -f $(TARGET) lib/libdummy.so